package com.lantosec.hmrp.modules.category.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.category.vo.AssetsPrintTemplateVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 资产标签打印模板 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AssetsPrintTemplate extends BaseEntity<AssetsPrintTemplateVO> {

    private static final long serialVersionUID = 1L;
    public AssetsPrintTemplate(AssetsPrintTemplateVO vo){
        this.templateId = vo.getTemplateId();
        this.templateType = vo.getTemplateType();
        this.templateContent = vo.getTemplateContent();
        this.templateName = vo.getTemplateName();
    }

    @Override
    public AssetsPrintTemplateVO convertToVO(){
        return new AssetsPrintTemplateVO(this);
    }


    /**
     * 模板ID
     */
    @TableId(value = "template_id", type = IdType.ASSIGN_UUID)
    private Integer templateId;

    /**
     * 模板类型(1普通RFID 2抗金属RFID)
     */
    private String templateType;

    /**
     * 模板内容
     */
    private String templateContent;

    /**
     * 模板名称
     */
    private String templateName;


    public enum ColName {
        template_id, template_type, template_content, template_name, 
    }
}
